{% extends base_template|default:"base.html" %}
{% load i18n %}
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <title>{{title.name}}</title>
	
</head>

{% block content %}

<body>
<h2 class="changeBlue">Add Work</h2>
 <table>
 
    {% if form.errors %}
        <p style="color: red;">
            Please correct the error{{ form.errors|pluralize }} below.
        </p>
    {% endif %}

    <form action="" method="post">
	{% csrf_token %}
		 
		
      
		<tr><td><label for="id_test">Your tests:</label></td><td><input id="id_other_test" type="other_test" name="other_test"  maxlength="600"  required="yes" title="Tests are required!"  /></td></tr>
		<tr><td><label for="id_unit_price">Amount:</label></td><td><input id="id_unit_price" type="number" name="unit_price"  maxlength="11"  required="yes" title="amount is required!"  /></td></tr>
         <tr><td><label for="id_sample">No. of such samples:</label></td><td><input id="id_sample" type="number" pattern="[0-9]" min="1" name="sample"  maxlength="11" required="Yes" title="You must enter a no. of samples in the range 1-9."/></td></tr>
	<tr><td><label for="id_site">Address of Site:</label></td><td><input id="id_site" type="site" name="site"  maxlength="600"  required="yes" title="Site is Required!"  /></td></tr>
	<tr><td><label for="id_letter">Letter No:</label></td><td><input id="id_letter" name="letter_no"  maxlength="11" /></td></tr>
	<tr><td><label for="id_letterd">Letter Date:</label></td><td><input id="id_letter_date" name="letter_date"  maxlength="11" /></td></tr>	
	<tr><td><label for="id_tds">TDS:</label></td><td><input id="id_tds" type="number" name="tds"  maxlength="11" value=0 /></td></tr>	
	<tr>
			<td><label for="id_discount">Discount:</label></td>
			<td><input id="id_discount" type="number" name="discount"  maxlength="11" value=0 />
			</td>
		</tr>	
        	   
		
	
	<tr><td><label for="id_work">Type of Work:</label></td><td><select name="type_of_work">
{% for typeofwork in work %}
    <option value="{{typeofwork.id }}">{{ typeofwork.name }}</option>
{% endfor %}
</select></td></tr>
	
</table>
        <input type="submit" value="Submit">
    </form>
</html>
{% endblock %}
